<style>
    .input-notice{
        color: #4e73df;
        margin-top: 5px;
        display: block;
    }
</style>
<form id="sync-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="row[default_num]" value="{$goods.num}">
    <input type="hidden" name="row[min_buy_num]" value="{$goods.minbuynum_0}">
    <input type="hidden" name="row[max_buy_num]" value="{$goods.maxbuynum_0}">
    <input type="hidden" name="row[order_params]" value='{$order_params}'>
    <input type="hidden" name="row[goods_type]" value='{$goods.goods_type}'>
    <div class="panel panel-default panel-intro">
        <div class="panel-heading">
            <div class="panel-lead">
                <em>同步配置</em>
                商品名称：<a href="{$docking_site.domain}index.php?m=Home&c=Goods&a=detail&id={$goods.id}&goods_type={$goods.goods_type}" target="_blank">{$goods.title}</a><br>
                商品进货价：{$goods.look_price}&nbsp;&nbsp;&nbsp;&nbsp;
                最小下单量：{$goods.minbuynum_0}&nbsp;&nbsp;&nbsp;&nbsp;
                最大下单量：{$goods.maxbuynum_0}
            </div>
            <ul class="nav nav-tabs">
                <li class="active"><a href="#one" data-toggle="tab" aria-expanded="true">基础信息</a></li>
                <li class=""><a href="#two" data-toggle="tab" aria-expanded="false">详细信息</a></li>
            </ul>
        </div>
        <div class="panel-body">
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade active in" id="one">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('商品分类')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select id="c-category_id" data-rule="required" class="form-control selectpicker" name="row[category_id]">
                                {foreach name="category" item="vo"}
                                <option value="{$vo.id}">{$vo.name}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('商品名称')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$goods.title}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('默认数量')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-num" data-rule="required" class="form-control" name="row[num]" type="text" value="{$goods.minbuynum_0}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('加价模板')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select id="c-increase_id" data-rule="required" class="form-control selectpicker" name="row[increase_id]">
                                <option value="0">不使用加价模板</option>
                                {foreach name="increase" item="vo"}
                                <option value="{$vo.id}">{$vo.name}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('售价')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-price" placeholder="价格对应默认数量" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number">
                        </div>
                    </div>
                    <div class="form-group hide">
                        <label class="control-label col-xs-12 col-sm-2">{:__('进货价')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-buy_price" value="{$goods.price}" class="form-control" step="0.01" name="row[buy_price]" type="number">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('封面图')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
                                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$goods.thumb}">
                                <div class="input-group-addon no-border no-padding">
                                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                </div>
                                <span class="msg-box n-right" for="c-images"></span>
                            </div>
                            <ul class="row list-inline faupload-preview" id="p-images"></ul>
                        </div>
                    </div>
                </div>
                <div class="tab-pane fade" id="two">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('商品详情')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <textarea id="c-details" class="form-control editor" rows="5" name="row[details]" style="height: 200px;"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>





    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
